package com.example.thridhero.zbxquery;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

/**
 * Created by thridHero on 2017/4/6.
 */

public class InitData {

    public static void main(String[] args) {
        initData();
    }

    public static void initData(){
        try {
            // read file content from file
            StringBuffer sb = new StringBuffer("");
            FileReader reader = new FileReader("D:\\work\\androidNote\\ZBXQuery\\app\\src\\main\\data\\data.sql");
            BufferedReader br = new BufferedReader(reader);

            String str = null;

            while ((str = br.readLine()) != null) {
                sb.append(str + "/n");
                System.out.println(str);
            }

            br.close();
            reader.close();


        }catch(FileNotFoundException e) {
            e.printStackTrace();
        }
        catch(IOException e) {
            e.printStackTrace();
        }
    }

}
